<% layout('layout/appLayout') %>
<% block('header').append(`<style>
.no_login_wrap {
  width:250px;
  margin:0 auto;
  background:#FFF;
  padding: 15px 0 10px 0;
}
.no_login_wrap .no_login_head {
  padding-right:15px;
}
.no_login_wrap .img_head {
  width:60px;
  height:60px;
  background:url('/app/img/head.png') no-repeat center;
  background-size:cover;
}
.order_wrap .weui-flex__item + .weui-flex__item{
  border-left:1px solid #e3e3e3;
}
</style>`) %>
<div class="page has_tab">
  <div class=""></div>
  <div class="page__bd">
    <% if(!user) {  %>
    <div class="light-bg padding border-bottom">
      <div class="no_login_wrap">
        <div class="weui-flex ">
          <div class="no_login_head">
            <div class="img_head"></div>
          </div>
          <div class="weui-flex__item">
            <p class="fs14 padding-bottom5">你还没有登录</p>
            <a href="/app/login" class="weui-btn weui-btn_mini weui-btn_default">立即登录/注册</a>
          </div>
        </div>
      </div>
    </div>
    <% } else { %>
      <div class="weui-cells padding-v" style="margin-top:0;">
        <a href="/app/setting"  class="weui-cell weui-cell_access">
          <div class="weui-cell__hd" style="position: relative;margin-right: 10px;">
            <div style="width:60px;height:60px;border-radius:100%;background:url(<%=user.headImg %>) no-repeat center;background-size:cover;"></div>
            <!--<img src="<%=user.headImg %>" style="width: 50px;display: block">-->
            <!--<span class="weui-badge" style="position: absolute;top: -.4em;right: -.4em;">8</span>-->
          </div>
          <div class="weui-cell__bd">
            <p><%=user.nickname %></p>
            <p style="font-size: 13px;color: #888888;">白石山农场欢迎您的到来</p>
          </div>
          <span class="weui-cell__ft"></span>
        </a>
      </div>
    <% } %>
    <!--<div class="light-bg padding">-->

    <!--</div>-->
    <div class="weui-cells__title">
      订单管理
      <a href="/app/orders" class="float_right">查看全部订单</a>
    </div>
    <div class="light-bg padding-v order_wrap">
      <div class="weui-flex text-center">
        <a class="weui-flex__item" href="/app/orders?posi=waitPay" >
          <i class="iconfont  icon-daifukuan" style="font-size:25px;"></i>
          <p class="fs13">待付款</p>
        </a>
        <a class="weui-flex__item" href="/app/orders?posi=pay">
          <i class="iconfont icon-daifahuo" style="font-size:25px;"></i>
          <p class="fs13">待发货</p>
        </a>
        <a class="weui-flex__item" href="/app/orders?posi=ship">
          <i class="iconfont icon-yifahuo1" style="font-size:25px;"></i>
          <p class="fs13">已发货</p>
        </a>
        <a class="weui-flex__item" href="/app/orders?posi=back">
          <i class="iconfont icon-yiwancheng" style="font-size:25px;"></i>
          <p class="fs13">已完成</p>
        </a>
      </div>
    </div>
    <div class="weui-cells__title"></div>
    <div class="weui-cells">
      <a class="weui-cell weui-cell_access" href="/app/cart">
        <div class="weui-cell__bd">
          <p>购物车</p>
        </div>
        <div class="weui-cell__ft">
        </div>
      </a>
      <a class="weui-cell weui-cell_access" href="/app/address">
        <div class="weui-cell__bd">
          <p>收货地址</p>
        </div>
        <div class="weui-cell__ft">
        </div>
      </a>
    </div>
    <div class="weui-cells__title"></div>
    <div class="weui-cells">
      <a class="weui-cell weui-cell_access" href="/app/page/company">
        <div class="weui-cell__bd">
          <p>公司介绍</p>
        </div>
        <div class="weui-cell__ft">
        </div>
      </a>
      <a class="weui-cell weui-cell_access" href="/app/page/about">
        <div class="weui-cell__bd">
          <p>联系我们</p>
        </div>
        <div class="weui-cell__ft">
        </div>
      </a>
    </div>

  </div>

  <!--<section class="margin-bottom">-->

  <!--</section>-->
  <!--<section class="margin-bottom">-->
    <!--<ul class="ui-list ui-border-tb ">-->
      <!--<li>-->
        <!--<div class="ui-avatar ui-list-img-square" style="width:65px;height:65px;">-->
          <!--<span style="background-image:url(http://placeholder.qiniudn.com/188x188)"></span>-->
        <!--</div>-->
        <!--<div class="ui-list-info ui-border-t">-->
          <!--<h4 class="ui-nowrap">歪歪</h4>-->
          <!--<p class="ui-nowrap">欢迎您的登录</p>-->
        <!--</div>-->
      <!--</li>-->
    <!--</ul>-->
  <!--</section>-->
  <!--<section class="margin-bottom">-->
    <!--<ul class="ui-list ui-list-single ui-list-link ui-border-tb">-->
      <!--<li class="ui-border-t">-->
        <!--<div class="ui-list-info">-->
          <!--<h4 class="ui-nowrap">我的订单</h4>-->
          <!--<div class="ui-txt-info">查看全部订单</div>-->
        <!--</div>-->
      <!--</li>-->
    <!--</ul>-->
    <!--<ul class="ui-tiled light-bg">-->
      <!--<li><i>2</i><div>待付款</div></li>-->
      <!--<li><i>1</i><div>待发货</div></li>-->
      <!--<li><i>3</i><div>已发货</div></li>-->
      <!--&lt;!&ndash;<li><i>3</i><div>退换货</div></li>&ndash;&gt;-->
    <!--</ul>-->
  <!--</section>-->
  <!--<section class="margin-bottom">-->
    <!--<ul class="ui-list ui-list-single ui-list-link ui-border-tb">-->
      <!--<li class="ui-border-t">-->
        <!--<div class="ui-list-info">-->
          <!--<div >-->
            <!--<i class="iconfont icon-cart padding-right5"></i>-->
          <!--</div>-->
          <!--<h4 class="ui-nowrap">我的购物车</h4>-->
          <!--<div class="ui-txt-info"></div>-->
        <!--</div>-->
      <!--</li>-->
      <!--<li class="ui-border-t">-->
        <!--<div class="ui-list-info">-->
          <!--<div >-->
           <!--<i class="iconfont icon-map padding-right5"></i>-->
          <!--</div>-->
          <!--<h4 class="ui-nowrap">收货地址管理</h4>-->
          <!--<div class="ui-reddot ui-reddot-static"></div>-->
        <!--</div>-->
      <!--</li>-->
    <!--</ul>-->
  <!--</section>-->
  <!--<section class="margin-bottom">-->
    <!--<ul class="ui-list ui-list-single ui-list-link ui-border-tb">-->
      <!--<li class="ui-border-t">-->
        <!--<div class="ui-list-info">-->
          <!--<div >-->
            <!--<i class="iconfont icon-cart padding-right5"></i>-->
          <!--</div>-->
          <!--<h4 class="ui-nowrap">公司介绍</h4>-->
          <!--<div class="ui-txt-info"></div>-->
        <!--</div>-->
      <!--</li>-->
      <!--<li class="ui-border-t">-->
        <!--<div class="ui-list-info">-->
          <!--<div >-->
            <!--<i class="iconfont icon-map padding-right5"></i>-->
          <!--</div>-->
          <!--<h4 class="ui-nowrap">联系我们</h4>-->
          <!--<div class="ui-reddot ui-reddot-static"></div>-->
        <!--</div>-->
      <!--</li>-->
    <!--</ul>-->
  <!--</section>-->
</div>
